package Properties;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;

public class demo2 {
    public static void main(String[] args) throws IOException {
        Properties pp = new Properties();
        pp.setProperty("zhangsan","beijing");
        FileWriter fos = new FileWriter("/Users/tkf/Desktop/7.java基础/javaBase/homeExtendDay14/src/main/java/Properties/config.properties");
//        pp.store(fos,"null");
        pp.store(fos,"注释,不写可以是null");
        fos.close(); // 每次都必须关闭读/写流
    }
}
